import { defaultTheme, defineUserConfig, viteBundler } from "vuepress";
import { demoBlockPlugin } from "@ddongui/vuepress-plugin-demo-block";
import path from "path"
import { cn } from "./navbar.config";
export default defineUserConfig({
    base: "/ddong-ui/",
    head: [["link", { rel: "icon", href: "/images/favicon.png" }]],
    description: "a components library of C-side for vue 3",
    plugins: [demoBlockPlugin({ examplesPath: path.resolve(__dirname, "../examples/") })],
    title: "ddongUI",
    // 语言选择菜单，依据路径对应主题中的locales
    locales: {
        "/": {
            lang: "简体中文",
        },
        "/en/": {
            lang: "en-US",
        },
    },
    bundler: viteBundler({
        viteOptions: {
            resolve: {
                // 移除不同版本的重复导入
                dedupe: ["vue"]
            }
        }
    })
    ,
    // 默认主题
    theme: defaultTheme({
        logo: "/images/favicon.png",
        // 多语言
        locales: {
            "/": cn,
            "/en/": {
                selectLanguageName: "English",
                navbar: [
                    { text: "指南", link: "/en/guide/" },
                    { text: "组件", link: "/en/components/" },
                ],
            },
        },
        // 仓库名称和链接
        repoLabel: "GitHub",
        repo: "https://gitee.com/ddongui_1/ddong-ui.git",
    }),
});
